﻿
(function () {
    appModule.controller('common.views.notificationManage.detail', [
         '$scope', '$uibModalInstance', 'abp.services.app.notification', 'notificationId', 'abp.services.app.user', '$http',
        function ($scope, $uibModalInstance, notificationService, notificationId, userService, $http) {
            var vm = this;
            vm.saving = false;
            //首先将notification数据设置为null
            vm.notification = null;

            //取消关闭页面
            vm.cancel = function () {
                $uibModalInstance.dismiss();
            };

            //初始化页面
            function init() {
                notificationService.getUserNotificationByIdAsync({
                    tenantId: 1,
                    userNotificationId: notificationId
                }).then(function (result) {
                    vm.notification = result.data.notification.data;
                });
            }
            //执行初始化方法
            init();
        }
    ]);
})();